An encoder in the related art that detects an amount of relative movement between a pair of measurement target parts that move relative to each other is known. The encoder includes a scale having marks, and a detector having a reading unit that moves along the scale. The detector detects an amount of relative movement between the scale and the detector on the basis of a signal read by the reading unit from the marks of the scale.
This encoder has a problem in that in a case where the detector is skewed relative to the scale or the like and the attitude of the detector with respect to the scale changes, the signal read by the reading unit changes as well, and the precision at which the amount of relative movement is detected will decrease as a result.
In response to this problem, for example, a photoelectric encoder disclosed in Patent Document 1 includes a main scale (a scale), and a light-receiving unit (a detector), having a light-receiving element (a reading unit) that receives light (a signal) via the main scale, that detects an amount of relative movement of the main scale from the light received by the light-receiving element. The photoelectric encoder has a first lens and a second lens between the main scale and the light-receiving unit. The first lens and second lens are identical, and the second lens and first lens are situated reversely. The photoelectric encoder has an aperture between the first lens and the second lens. The aperture is arranged at the position of the focal points of the first lens and the second lens, and has a slit extending in a direction along which the light-receiving unit moves relative to the main scale and a direction orthogonal to a vertical line on a face of the scale where the marks are arranged.
With the photoelectric encoder according to Patent Document 1, the second lens and the first lens being situated reversely makes it possible to inversely correct aberration arising in the first lens due to the light-receiving unit being skewed relative to the main scale or the like. Additionally, because the aperture is arranged at the position of the focal point of the second lens, the light emitted to the light-receiving element from the second lens can be made into parallel light. The photoelectric encoder therefore inversely corrects aberration using the second lens and makes the light into parallel light using the aperture, and thus even in a case where the light-receiving unit is distanced from the main scale, for example, the same amount of light can be emitted to the light-receiving element as if the light-receiving unit was arranged in the normal position (not distanced from the main scale). The photoelectric encoder can therefore stabilize the detection precision of the amount of relative movement detected by the light-receiving unit and improve the reliability.